package org.bear.bearutildemo.activities;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;

import com.zoke.library.util.PersistTool;
import com.zoke.library.util.StatusBarUtil;

import org.bear.bearutildemo.R;
import org.bear.bearutildemo.config.DemoConfig;

public class MainActivity extends AppCompatActivity {

    private Toolbar toolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        toolbar = (Toolbar) findViewById(R.id.toolbar);
        //修改配色
        StatusBarUtil.setColor(this, PersistTool.getInt(DemoConfig.APP_THEME_COLOR, getResources().getColor(R.color.colorAccent)) + 10);//区别色值 增加10个进制
        toolbar.setBackgroundColor(PersistTool.getInt(DemoConfig.APP_THEME_COLOR, getResources().getColor(R.color.colorAccent)));
    }

}
